package cn.model;

import cn.util.Toolsutil;

import java.sql.Timestamp;

public class TUser {
    private String userid;
    private String username;
    private String realname;
    private String age;
    private int roleid;
    private String pwd;
    private String phone;
    private int status;
    private String lastlogindate;
    private String createtime;
    private String loginstatus;
    private String note;

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public int getRoleid() {
        return roleid;
    }

    public void setRoleid(int roleid) {
        this.roleid = roleid;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getLastlogindate() {
        return lastlogindate;
    }

    public void setLastlogindate(String lastlogindate) {
        this.lastlogindate = lastlogindate;
    }

    public String getCreatetime() {
        return Toolsutil.GetDateFormat(createtime);
    }

    public void setCreatetime(String createtime) {
        this.createtime = createtime;
    }

    public String getLoginstatus() {
        return loginstatus;
    }

    public void setLoginstatus(String loginstatus) {
        this.loginstatus = loginstatus;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TUser tUser = (TUser) o;

        if (roleid != tUser.roleid) return false;
        if (status != tUser.status) return false;
        if (userid != null ? !userid.equals(tUser.userid) : tUser.userid != null) return false;
        if (username != null ? !username.equals(tUser.username) : tUser.username != null) return false;
        if (realname != null ? !realname.equals(tUser.realname) : tUser.realname != null) return false;
        if (age != null ? !age.equals(tUser.age) : tUser.age != null) return false;
        if (pwd != null ? !pwd.equals(tUser.pwd) : tUser.pwd != null) return false;
        if (phone != null ? !phone.equals(tUser.phone) : tUser.phone != null) return false;
        if (lastlogindate != null ? !lastlogindate.equals(tUser.lastlogindate) : tUser.lastlogindate != null)
            return false;
        if (createtime != null ? !createtime.equals(tUser.createtime) : tUser.createtime != null) return false;
        if (loginstatus != null ? !loginstatus.equals(tUser.loginstatus) : tUser.loginstatus != null) return false;
        if (note != null ? !note.equals(tUser.note) : tUser.note != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = userid != null ? userid.hashCode() : 0;
        result = 31 * result + (username != null ? username.hashCode() : 0);
        result = 31 * result + (realname != null ? realname.hashCode() : 0);
        result = 31 * result + (age != null ? age.hashCode() : 0);
        result = 31 * result + roleid;
        result = 31 * result + (pwd != null ? pwd.hashCode() : 0);
        result = 31 * result + (phone != null ? phone.hashCode() : 0);
        result = 31 * result + status;
        result = 31 * result + (lastlogindate != null ? lastlogindate.hashCode() : 0);
        result = 31 * result + (createtime != null ? createtime.hashCode() : 0);
        result = 31 * result + (loginstatus != null ? loginstatus.hashCode() : 0);
        result = 31 * result + (note != null ? note.hashCode() : 0);
        return result;
    }
}
